public class Chapter11 {
    public static void main(String[] args) {
        //11：定义一个整数数组，判断其中是否有重复的数据
        int a[]={1,2,3,4,5,6,7,8,9,10};
        int i = 0;
        int k = 0;
        for (;i<a.length-1;i++) {
            for (int j = i+1; j < a.length; j++) {
                if (a[i] == a[j]) {
                    System.out.println("有重复");
                    k++;
                    break;
                }
                if (k>0)
                    break;
            }
        }
            if (k==0)
                System.out.println("没有重复");
    }
}
